home *** CD-ROM | disk | FTP | other *** search
- //demo program of dmouse.lib functions
- #include <iostream.h>
-
- //function prototypes
- int initmouse(void);
- void showmouse(void);
- void hidemouse(void);
- void getmouse(int *,int *,int *);
-
- void main()
- {//begin main
-
- int mx, my, button;
- initmouse();
- showmouse();
- cout<<"\n";
-
- while (button!=3){//begin while
- getmouse(&mx, &my, &button);
- hidemouse();
- cout<<"X: "<<mx<<" Y: "<<my<<" BUTTON: "<<button<<" \r";
- showmouse();
- hidemouse();
- }//end while
- cout<<"\n";
- }//end main
-
-